package StudyCode.summary.textfile;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReadTextFileUsingBufferedStream {
	public static void main(String[] arguments) {
		try (FileReader file = new FileReader("E:/Copy/test1.txt")) {
			try (BufferedReader buff = new BufferedReader(file)) {

				boolean eof = false;
				while (!eof) {
					String line = buff.readLine();
					if (line == null) {
						eof = true;
					} else {
						System.out.println(line);
					}
				}
				buff.close();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
